var webview = document.getElementById('webview');
webview.addEventListener("dom-ready", function () {
  webview.openDevTools();
});
$("#test-refresh").on("click",function(){
  webview.preload="electron/ningjianhao/addWorker.js";
  var current = webview.getURL();
  webview.loadURL(current)
});
$("#test-show-btn").on("click",function(){
  $("#menu").animate({left:"0"});
});
$("#menu").on("mouseleave",function(){
  $(this).animate({left:"-300px"});
});
$("#Jenkins").on("click",function(){
    webview.src = 'http://192.168.59.240:8080/login';
});
$("#disconf-online").on("click",function(){
  webview.src = 'http://192.168.59.240:8083';
});
$("#disconf-test").on("click",function(){
  webview.src = 'http://disconf.sxb.lol';
});
$("#log-test").on("click",function(){
  webview.src = 'http://101.37.175.21';
});
$("#log-online").on("click",function(){
    webview.src = 'http://101.37.174.95';
});
$("#test-out").on("click",function(){
});
$("#test-inside").on("click",function(){
  webview.openDevTools();
});
$("#accordion").on("click","button",function(){
  var msg = $(this).data('name');
  if(msg){
    var current = webview.getURL();
    if (current.indexOf("?") > 0) {
      webview.loadURL(current + "&_from="+msg)
    } else {
      webview.loadURL(current + "?_from="+msg)
    }
  }
});